home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
- # Old style font symlink program by Otto J. Makela <otto@jyu.fi>
- # Distributed under the GNU Public Licence -- see file COPYING for details
- set progname="$0"
- set progname="$progname:t"
-
- echo "${progname} 1.0 (c) 1993 by Otto J. Makela"
- echo "Distributed under the GNU Public Licence -- see file COPYING for details"
-
- if ( $#argv>0 && -d "$1" ) then
- set todir="$1"
- shift
- else
- set todir=~/Library/Fonts
- endif
-
- if ( ! -d "$todir" ) mkdir $todir
- if ( ! -d "$todir" ) then
- echo "${progname}: directory $todir does not exist and can't be made"
- exit 1
- endif
-
- foreach directory ( afm outline bitmap )
- if ( ! -d "${todir}/${directory}" ) then
- echo "${progname}: mkdir ${todir}/${directory}"
- mkdir "${todir}/${directory}"
- endif
- end
-
- if ( $#argv == 0 ) set argv=( ${todir}/*.font )
-
- foreach fontdirectory ( $* )
- echo "${progname}: ${fontdirectory}"
- set fontname="${fontdirectory:t}"
- set fontname="${fontname:r}"
- # Just one PostScript font
- ln -s "${fontdirectory}/${fontname}" "${todir}/outline"
- # There may be lots of .afm files, one for each screen bitmap font
- foreach afmfile ( ${fontdirectory}/*.afm )
- ln -s "$afmfile" "${todir}/afm"
- done
- # There need not be any bitmaps
- if ( -f "${fontdirectory}/${fontname}.bepf" ) then
- ln -s "${fontdirectory}/${fontname}.bepf" "${todir}/bitmap"
- endif
- end
-